import request from '@/utils/request'


export function GetPositions(prjId, pageIndex, pageSize, lineName, no) {
  return request({
    url: '/api/project/position/GetPositions',
    method: 'get',
    params: {
      prjId, pageIndex, pageSize, lineName, no
    }
  })
}

export function GetPosition(id) {
  return request({
    url: '/api/project/position/GetPosition',
    method: 'get',
    params: {
      id
    }
  })
}

export function GetAllTerms(data) {
  return request({
    url: '/api/project/position/GetAllTerms',
    method: 'post',
    data
  })
}

export function AddPositions(data) {
  return request({
    url: '/api/ShowData/AddPositons',
    method: 'post',
    data
  })
}


export function GetReportDate(data) {
  return request({
    url: '/api/project/position/GetReportDate',
    method: 'post',
    data
  })
}

export function GetSumDate(prjIds) {
  return request({
    url: '/api/project/position/GetSumData',
    method: 'get',
    params: {
      prjIds
    }
  })
}

export function GetImportFiles(pageIndex, pageSize) {
  return request({
    url: '/api/project/position/GetImportFiles',
    method: 'get',
    params: {
      pageIndex, pageSize
    }
  })
}

export function DeleteAll(prjId) {
  return request({
    url: '/api/ShowData/DeleteAll',
    method: 'get',
    params: {
      prjId
    }
  })
}

export function SetDestroyDate(id, destroy) {
  return request({
    url: '/api/ShowData/setDestroyDate',
    method: 'get',
    params: {
      id, destroy
    }
  })
}
export function GetImageZip(prjId) {
  return request({
    url: '/api/ShowData/GetImageZip',
    method: 'get',
    params: {
      prjId
    }
  })
}
export function DeleteImage(imageId) {
  return request({
    url: '/api/ShowData/DeleteImg',
    method: 'get',
    params: {
      imageId
    }
  })
}